package glen.util;

import org.apache.ibatis.session.SqlSessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public abstract class BaseSvr {

    private static Logger log = LoggerFactory.getLogger(BaseSvr.class);
    private String NAMESPACE = "mappers";

    static protected SqlSessionFactory sf;

    /**
     * Default Constructor
     */
    public BaseSvr(String namespace) {

        this.NAMESPACE = namespace;
        this.sf = MyBatisConnectionFactory.getSqlSessionFactory();
        if (sf == null)
            log.error("Error: Could not instantiate MyBatisDAO. Loading myBatis sessionFactory failed.");
    }

}